package vip.xiaonuo.facedoor.task;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import vip.xiaonuo.core.timer.TimerTaskRunner;
import vip.xiaonuo.facedoor.modular.memberdevice.mapper.MemberDeviceMapper;

import javax.annotation.Resource;

@Component
@Slf4j
public class MemberFeatureTask implements TimerTaskRunner {

    @Resource
    private MemberDeviceMapper memberDeviceMapper;

    @Override
    public void action(String jobParams, String taskId) {
        doTask();
    }

    @Override
    public void executeXxlJob() throws InterruptedException {
        doTask();
    }

    public void doTask(){
        int num = memberDeviceMapper.updateStatusHasAvatarNoFeature();
        log.info("批量更新有头像无特征值的数据,数据数量：[]",num);
    }
}
